package inutan.game.action;

import inutan.common.constant.DataConstant;
import inutan.game.business.GameFlowContext;
import org.ricks.common.lang.Logger;
import org.ricks.ioc.anno.Action;
import org.ricks.ioc.anno.ActionMethod;

import java.util.concurrent.atomic.AtomicLong;

/**
 * @author chenwei
 * @Description: 测试接口
 * @date 2023/1/416:24
 */
@Action(modularId = 1)
public class ActionTestController {

    private static final AtomicLong l = new AtomicLong();
    @ActionMethod(cmd = 11111)
    public void test(GameFlowContext context) {
        long count = l.incrementAndGet();
        Logger.info("收到网关消息 userId:"+Thread.currentThread().getName()+" enter room.................................  userId:" + context.getUserSessionId() + ", count:" + count);
        context.sendResponse(DataConstant.BROADCAST_MESSAGE,(short) 11111);
    }
}
